Method of detecting audio input mode

ABSTRACT

A method of detecting audio input mode applied to an electronic device is disclosed. According to how the user presses the start button of the electronic device, the audio input mode is determined to be a short-press mode or a long-press mode. The method of detecting an audio input mode includes: detecting if a pressing time of the start button is less than a threshold time; if so, determining that the audio input mode is the short-press mode; if not, detecting if an audio time of the receiving audio of the microphone exceeds an audio threshold time during the pressing time; if so, determining that the audio input mode is the long-press mode; if not, determining that the audio input mode is the short-press mode.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a method of detecting audio input mode,and particularly to a method of detecting audio input mode according toa user's operating habit.

2. Description of the Related. Art

In general, communication software, AI (artificial intelligence)software, or translation software has an audio input function thatallows users to directly use dictation to input data to mobile phones,so users no longer need to spend a lot of time typing on a phone keypador virtual keyboard to enter text.

The communication software or the translation software usually providesa long-press audio operation button on the software interface for audioinput. The long-press type audio operation button is used for a user topress and hold down, and the user can also speak to the mobile phonewhile holding down the audio operation button. In this way, the mobilephone will record the audio received while the button is pressed, andthe communication software, the AI software or the translation softwarewill perform a cloud upload or convert the recorded audio to text. Inaddition, certain software provides a short-press audio operation buttonon the software interface. The short-press type audio operation buttonis used for a user to short press to enable the software to start therecording function for audio recording. After the user finishesrecording audio, the user may press the short audio operation buttonagain or the software automatically turns off the audio recordingfunction, and the communication software or the translation softwarewill perform a cloud upload or convert the recorded audio to text.

However, users are usually only accustomed to using one of thelong-press or short-press modes of operation. Thus, when using differentsoftware, they often need to modify their own habits and reluctantly usedifferent operating modes provided by different software.

Therefore, it is necessary to provide a method of detecting andadjusting audio input modes according to a user's operating habit.

SUMMARY OF THE INVENTION

It is a major objective of the present invention to provide a method ofdetecting audio input mode according to a user's operating habit.

To achieve the above objective, a method of detecting audio input modeis applied to an electronic device in the present invention, wherein theelectronic device includes a microphone and a start button. Themicrophone is used to receive audio input. The start button is used fora user to press to enable an audio input mode to input voice, which isdetermined to be a short-press mode or a long-press mode according tohow a user presses the start button. The method of detecting audio inputmode includes: detecting if a pressing time of the start button is lessthan a threshold time, where the pressing threshold time is a durationwithin a range of 0.001 seconds to 1.5 seconds; if so, determining thatthe audio input mode is the short-press mode; if not, detecting if anaudio time of receiving audio of the microphone exceeds an audiothreshold time during the pressing time, where the audio threshold timeis 0 seconds to 1.5 seconds; if so, determining that the audio inputmode is the long-press mode; if not, determining that the audio inputmode is the short-press mode.

According to an embodiment of the present invention, the pressingthreshold time is a duration within the range of 0.001 seconds to 0.8seconds.

According to an embodiment of the present invention, the audio thresholdtime is 0.2 seconds to 0.9 seconds.

According to an embodiment of the present invention, detecting the audiotime is started when the user presses the start button.

According to an embodiment of the present invention, the electronicdevice is a mobile phone, a computer or a tablet computer.

According to an embodiment of the present invention, the electronicdevice further includes a speaker which is used to issue a prompt sound;a start time of detecting the audio time is after the speaker plays theprompt sound.

According to an embodiment of the present invention, the electronicdevice further includes a headset which is used to issue a prompt sound;a start time of detecting the audio time is after the headset plays theprompt sound.

According to an embodiment of the present invention, when the audioinput mode is the long-press mode, an end time of user input audio isthe time at which the user releases the start button; when the audioinput mode is the short-press mode, the end time of user input audio isnot the time at which the user releases the start button.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a system architecture diagram of an electronic deviceaccording a first embodiment of the present invention;

FIG. 2 is a flowchart showing steps in a method of detecting audio inputmode according to the first embodiment of the present invention;

FIG. 3 is a schematic diagram of the electronic device according to thefirst embodiment of the present invention;

FIG. 4 is a system architecture diagram of an electronic deviceaccording a second embodiment of the present invention;

FIG. 5 is a flowchart showing steps in a method of detecting audio inputmode using a headset according to the second embodiment of the presentinvention; and

FIG. 6 is a schematic diagram of the electronic device according to thesecond embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Hereafter, the technical content of the present invention will be betterunderstood with reference to preferred embodiments.

Hereafter, please refer to FIG. 1 to FIG. 3 regarding a method ofdetecting audio input mode according to a first embodiment of thepresent invention. FIG. 1 is a system architecture diagram of anelectronic device according a first embodiment of the present invention;FIG. 2 is a flowchart showing steps in a method of detecting audio inputmode according to the first embodiment of the present invention; andFIG. 3 is a schematic diagram of the electronic device according to thefirst embodiment of the present invention.

As shown in FIG. 1 to FIG. 3, in the first embodiment, the method ofdetecting audio input mode is programmed as a computer program andapplied to an electronic device 10. The method of detecting audio inputmode can automatically detect whether the user's voice input mode is along-press mode or a short-press mode according to the user's operatinghabit. The electronic device 10, for example, may be a mobile phone, butmay also be a computer or a tablet computer. The electronic device 10includes a microphone 11, a start button 12, a speaker 13, a touchscreen 14, a processor 15, and a storage means 16.

In the first embodiment of the present invention, the microphone 11 isused to receive a user's voice input. The touch screen 14 is used todisplay information for the user to view and manipulate. The processor15, which is a Central Processing Unit (CPU), is electrically connectedto the microphone 11, the start button 12, the speaker 13, the touchscreen 14, and the storage means 16, for controlling the operation ofthese devices. The storage means 16 is a memory for storing the computerprogram programmed by the method of detecting audio input mode.

The start button 12 is a physical button that can be used by the user topress to start an audio input mode to input voice. Specifically,according to the difference of how the user presses the start button 12,the audio input mode is present as a short-press mode or a long-pressmode. If the user long presses the start button 12, the audio input modeis the long-press mode. In the long-press mode, a start time at whichthe user inputs audio is the time at which the user presses the startbutton 12; an end time of user input audio is the time at which the userreleases the start button 12. If the user short presses the start button12, the audio input mode is the short-press mode. In short-press mode, astart time at which the user inputs audio is the time at which the userpresses the start button 12; an end time of user input audio is not thetime at which the user releases the start button 12. An end time of userinput audio may be the time at which the user presses the start button12 again or the time at which the user stops inputting audio afterinputting audio for a short time. However, the start button 12 is notlimited to a physical button. For example, the touch screen 14 may alsodisplay a virtual start button 12 a (e.g., a smart phone usually has astart button 12 a in a virtual form) for the user to press to start theaudio input mode for audio input.

When the user executes a program that allows voice input (e.g.,translation software, communication software, AI quiz software, andsearch software), the program programmed by the method of detectingaudio input mode in the present invention can be designed toautomatically start on the electronic device 10 or to be built into aprogram that allows audio input. In the present invention, thetranslation software in a computer program according to the method ofdetecting audio input mode is used as example, as shown in FIG. 3. Whenthe user starts the translation software, the translation softwareprovides a virtual start button 12 a on the touch screen 14 according tothe method of detecting audio input mode, and displays a message of“Press the start button to input voice” to inform the user to startaudio input. Then the users can follow their own habits to press thestart button 12 or a virtual start button 12 a in a long-press orshort-press manner, and the method of detecting audio input mode detectsthat the user wants to input voice through the long-press mode or theshort-press mode according to the user's operating behavior of pressingthe button and inputting the audio later. First, when the user pressesthe physical start button 12 or the virtual start button 12 a, themethod of detecting audio input mode will proceed to Step 101: Detectingif a pressing time of the start button is less than a pressing thresholdtime, where the pressing threshold time is a duration within a range of0.001 seconds to 1.5 seconds.

When a user presses either of the start buttons 12, 12 a, i.e., thephysical start button 12 or the virtual start button 12 a, the time atwhich the user presses one of the start buttons 12, 12 a will be sent tothe processor 15, and the time at which the user releases a start button12, 12 a will also be sent to the processor 15. The processor 15 willcalculate the time difference between the pressing of the button and thereleasing of the button, and the time difference is a pressing time P1of a start button 12, 12 a. The processor 15 will also detect whetherthe pressing time P1 is less than a pressing threshold value PT1; thepressing threshold time PT1 in the present invention is a specificduration within a range of 0.001 to 1.5 seconds, preferably within arange of 0.001 to 0.8 seconds. Through the actual observation andstatistics of user's operating behavior, the average user short-pressoperation has been determined to be about 0.6 seconds, and the longesttime of the pressing operation will not exceed 1.5 seconds, so thepressing threshold time PT1 is designed to range from 0.001 seconds to1.5 seconds.

If the processor 15 detects that the pressing time P1 is less than apressing threshold time PT1, the method proceeds to Step 102:Determining if the audio input mode is the short-press mode.

In the first embodiment, if the user presses the start button 12 for 0.6seconds and then releases the start button 12, the processor 15 willcalculate the pressing time P1 of the start button 12 to be 0.6 seconds,which is less than the 1.5 seconds of the pressing threshold time PT1;thus, the processor 15 will determine that the audio input mode to beused by the user is the short-press mode. Consequently, the processor 15immediately adjusts the translation software and the start buttons 12,12 a to enable the translation software to start the recording functionand record the audio to be input by the user, and the processor 15 alsomakes the start buttons 12, 12 a ready to accept the user's second pressto stop recording; or the processor 15 can also adjust the translationsoftware and the start buttons 12, 12 a such that the translationsoftware starts the recording function, records the audio to be input bythe user, and stops recording when the microphone 11 does receive theuser's voice (that is, when the user no longer speaks).

If the processor 15 detects that the pressing time P1 is not less than apressing threshold time PT1, the method proceeds to Step 103: Detectingif an audio time V1 of the audio received by the microphone exceeds anaudio threshold time VT1 during the pressing time, where the audiothreshold time VT1 is 0 seconds to 1.5 seconds.

Through the actual observation and statistics of user's operatingbehavior, it has been determined that in general, when a user performs along-press to input voice, the user generally inputs the audio whilepressing the start button 12, and the user usually inputs the audio formore than 1.5 seconds. Therefore, in order to determine whether the userwants to input voice using the long-press mode, the processor 15 enablesthe microphone 11 to receive the audio input when the user presses andholds the start button 12 during the pressing time P1. The microphone 11sends the audio received in the pressing time P1 to the processor 15,which calculates the time length of an audio time V1 of the audioreceived by the microphone 11; the processor 15 also detects whether theaudio time V1 exceeds an audio threshold time VT1, where the audiothreshold time VT1 is 0 seconds to 1.5 seconds, preferably 0.2 secondsto 0.9 seconds. In addition, it should be noted that the starting pointfor the detection of the audio time V1 in the first embodiment isdesigned to start receiving audio during the pressing time P1, but thedetection of the audio time V1 may also be designed to start as soon asthe user presses the start button 12.

If the processor 15 detects that the audio time V1 of the audio receivedby the microphone 11 during the pressing time P1 exceeds an audiothreshold time VT1, it can be determined that the audio input mode to beused by the user is indeed the long-press mode. Thus, the methodcontinues to Step 104: Determining that the audio input mode is thelong-press mode.

In the first embodiment, if the processor 15 determines that the audiotime V1 exceeds an audio threshold time VT1, the processor 15 will thendetermine that the audio input mode to be used at the moment is thelong-press mode. Thus, the processor 15 immediately adjusts thetranslation software and the start buttons 12, 12 a such that therecording function records the audio input by the user pressing thepressing time P1 of a start button 12, 12 a and allows the start buttons12, 12 a to stop recording when the user releases a start button 12, 12a.

After the method returns to Step 103, if the processor 15 detects thatthe audio time V1 of the audio received by the microphone 11 during thepressing time P1 does not exceed an audio threshold time VT1, it can bedetermined that the audio input mode to be used by the user is not thelong-press mode. For example, some elderly people may not be good atoperating the electronic device 10. After an elderly user long-pressesthe start button 12, such a user will only output brief audio to themicrophone 11. Therefore, the pressing time P1 exceeds the pressingthreshold time PT1, but the audio time V1 does not exceed the audiothreshold time VT1. Accordingly, if this situation occurs, the method ofthe present invention will continue to Step 102: Determining that theaudio input mode is the short-press mode.

If the processor 15 determines that the audio time V1 of the user audioreceived by the microphone 11 does not exceed the 1.5 seconds of anaudio threshold time VT1 (e.g., the audio time V1 is merely 0.5seconds), the processor 15 determines that the currently used audioinput mode is the short-press mode. Consequently, the processor 15instantly adjusts the translation software and the start buttons 12, 12a, enables the translation software to start the recording function,records the audio to be input by the user, and makes the start buttons12, 12 a ready to accept the user's press again to stop recording; orthe processor 15 can also adjust the translation software and the startbuttons 12, 12 a such that the translation software starts the recordingfunction, records the audio to be input by the user, and stops recordingwhen the microphone 11 does not receive the user's voice (that is, whenthe user no longer speaks).

Hereafter, please refer to FIG. 4 to FIG. 6 together regarding a methodof detecting audio input mode according to a second embodiment of thepresent invention. FIG. 4 is a system architecture diagram of anelectronic device according to the second embodiment of the presentinvention; FIG. 5 is a flowchart showing steps of a method of detectingaudio input mode with a headset according to the second embodiment ofthe present invention; and FIG. 6 is a schematic diagram of theelectronic device according to the second embodiment of the presentinvention.

As shown in FIG. 4 to FIG. 6, in the second embodiment, the electronicdevice further includes a communication interface 17 and a headset 18.Both the communication interface 17 and the headset 18 are electricallyconnected to the processor 15. The communication interface 17 in thesecond embodiment, for example, may be a wireless module that can beelectrically connected to other components by a wireless transmissionfunction. The headset 18, for example, may be a wired multi-functionheadset that can emit sound and may include a microphone 181, a startbutton 182, and a speaker 183. The microphone 181 is used to receiveaudio, and the audio received by the microphone 181 can be sent to theprocessor 15. The start button 182 is used to receive the user'spressing operation, and the signal generated by the pressing operationreceived by the start button 182 can be transmitted to the processor 15.The speaker 183 is used for issuing a prompt sound to prompt the user tostart audio input. In the second embodiment, the headset 18 is pluggedinto a headset jack (not shown) of the electronic device 10 a so thatthe headset 18 and the microphone 181, the start button 182 and thespeaker 183 are also electrically connected to the processor 15 throughthe headphone jack. Consequently, the components in the headset 18 canalso be used in conjunction with the method of detecting audio inputmode in the present invention. However, the headset 18 is not limited toa wired headset but can also be a wireless headset that can beelectrically connected to the communication interface 17 to communicatewith the processor 15.

In the second embodiment, if the user wants to use the headset 18together with the translation software in the electronic device 10 a,the user may first start the translation software, and then according totheir own habits, press the start button 182 in a long-press orshort-press manner. At this time, the headset will perform Step 301:Receiving a press signal and sending the press signal.

When the user presses the start button 182, the start button 182 willreceive the press signal generated by the user pressing the start button182 and then will send the received press signal to the processor 15 viathe headset jack.

Then the processor 15 will perform Step 201: Receiving a press signal,and recording the time at which the press signal is received.

After receiving the press signal of the start button 182, the processor15 will record the time at which the press signal is received.

Then if the user releases the start button 182, the headset will performStep 302: Receiving a release signal and sending the release signal.

When the user releases the start button 182, the start button 182 willreceive the release signal generated by the user releasing the startbutton 182. The start button 182 will send the received release signalto the processor 15 via the headset jack.

Then the processor 15 will perform Step 202: Receiving a release signal,and recording the time at which the release signal is received.

After the processor 15 receives the release signal from the start button182, it will record the time at which the release signal is received.

Then the processor 15 will perform Step 203: Calculating the differencebetween the time at which the release signal is received and the time atwhich the press signal is received, and regarding the difference as oneof the start button pressing times.

The processor 15 calculates the difference between the time at which therelease signal of the start button 182 is received and the time at whichthe press signal of the start button 182 is received and regards thedifference in time as the pressing time P1 of the start button 182.

Then the processor 15 will perform Step 204: Detecting if a pressingtime of the start button is less than a pressing threshold time, wherethe pressing threshold time is a duration within a range of 0.001seconds to 1.5 seconds.

The processor 15 will detect if the pressing time P1 is less than apressing threshold time PT1, where the pressing threshold time is aduration within a range of 0.001 seconds to 1.5 seconds. If theprocessor 15 detects that the pressing time P1 is less than a pressingthreshold time PT1, the method proceeds to Step 205: Determining thatthe audio input mode is the short-press mode. Since Steps 204 and 205are equivalent to Steps 101 and 102 in the first embodiment, Steps 204and 205 will not be described in detail. In addition, since the headset18 in the second embodiment is plugged into the headset jack of theelectronic device 10 a, then after the processor 15 determines in step205 that the audio input mode to be used by the user is the short-pressmode, the processor 15 can also send a prompt sound input signal to theheadset 18, such that the headset 18 receives the prompt sound inputsignal and plays a prompt sound to prompt the user to start recording.

After Step 204, if the processor 15 detects that the pressing time P1 isnot less than the pressing threshold time PT1, the method proceeds toStep 206: If not, sending a prompt sound input signal.

If the processor 15 detects that the pressing time P1 is not less than apressing threshold time PT1, the processor 15 sends a prompt sound inputsignal to the headset 18. However, the processor 15 may also be designedto send the prompt sound input signal to the speaker 13.

Then the headset 18 will perform Step 303: Receiving a prompt soundinput signal, and playing the prompt sound.

The headset 18 will receive the prompt sound input signal and play aprompt sound to prompt the user to start recording. When a user hearsthe prompt sound from the headset 18, the user can speak into themicrophone 181 to start recording. However, if the processor 15 isdesigned to transmit the prompt sound input signal to the speaker 13,the speaker 13 will receive the prompt sound input signal and play theprompt sound.

When the user speaks into the microphone 181 for recording, the headset18 will perform Step 304: Receiving audio and sending the audio.

The microphone 181 of the headset 18 will receive audio input by theuser and send the audio to processor 15.

Then the processor will perform Step 207: Receiving audio and recordingthe time at which the audio is received.

The processor 15 receives the audio from the headset 18 and records thetime at which the audio is received. The time at which the processor 15records the audio is regarded as a start time for detecting the audiotime V1.

When the user stops inputting audio to the microphone 181, the headsetwill perform Step 305: Stopping receiving audio, and sending an audiostop signal.

When the user stops inputting audio to the microphone 181, themicrophone 181 will not receive any audio. At this time, the microphone181 of the headset 18 will stop receiving the audio and send an audiostop signal to the processor 15.

Then the processor 15 will perform Step 208: Receiving an audio stopsignal, and recording the time at which the audio stop signal isreceived.

The processor 15 receives the audio stop signal from the headset 18 andrecords the time at which the audio stop signal is received, and thetime of the audio stop signal being received is regarded as an end timeof detecting the audio time V1.

Then the processor 15 will perform Step 209: Calculating the differencebetween the time at which the audio is received and the time at whichthe audio stop signal is received, and the difference in time is treatedas the audio time of the audio received by the microphone.

The processor 15 will calculate the difference between the time at whichthe audio is received and the time at which the audio stop signal isreceived, and the difference is time is treated as the audio time V1 ofthe audio received by the microphone 181.

Then the processor 15 will perform Step 210: Detecting if an audio timeof the audio received by the microphone during the pressing time exceedsan audio threshold time, where the audio threshold time is 0 seconds to1.5 seconds. Also, with the result of Step 210, selectively the methodproceeds to Step 211: If so, determining that the audio input mode isthe long-press mode; or the method proceeds to Step 212: If not,determining that the audio input mode is the short-press mode. In thefirst embodiment, since Step 210 is equivalent to Step 103, Step 211 isequivalent to Step 104, and Step 212 is equivalent to Step 102, Steps210, 211, and 212 will not be described in detail herein.

The method of detecting audio inputting mode in the present inventioncan automatically detect if the audio inputting mode to be used by auser is a long pressing mode or a short pressing mode according touser's operating habit. This facilitates more natural and convenient useof electronic devices.

It should be noted that the described embodiments are only forillustrative and exemplary purposes, and that various changes andmodifications may be made to the described embodiments without departingfrom the scope of the invention as disposed by the appended claims.

What is claimed is:
 1. A method of detecting audio input mode applied toan electronic device, wherein the electronic device comprises amicrophone and a start button, the microphone being used to receive anaudio input, the start button being used for a user to press to enablean audio input mode for audio input, wherein the audio input mode isdetermined to be a short-press mode or a long-press mode according tothe difference of how the user presses the start button, the method ofdetecting audio input mode comprising: detecting if a pressing time ofthe start button is less than a threshold time, where the pressingthreshold time is a duration within a range of 0.001 seconds to 1.5seconds; if so, determining that the audio input mode is the short-pressmode and recording; if not, detecting if an audio time of the receivingaudio of the microphone exceeds an audio threshold time during thepressing time, where the audio threshold time is 0 seconds to 1.5seconds; if so, determining that the audio input mode is the long-pressmode and recording; and if not, determining that the audio input mode isthe short-press mode and recording.
 2. The method of detecting audioinput mode as claimed in claim 1, where the pressing threshold time is aduration within the range of 0.001 seconds to 0.8 seconds.
 3. The methodof detecting audio input mode as claimed in claim 2, wherein the audiothreshold time is 0.2 seconds to 0.9 seconds.
 4. The method of detectingaudio input mode as claimed in claim 3, wherein detecting the audio timeis started when the user presses the start button.
 5. The method ofdetecting audio input mode as claimed in claim 4, wherein the electronicdevice is a mobile phone, a computer or a tablet computer.
 6. The methodof detecting audio input mode as claimed in claim 5, wherein theelectronic device further includes a speaker which is used to issue aprompt sound; a start time for detecting the audio time is after thespeaker plays the prompt sound.
 7. The method of detecting audio inputmode as claimed in claim 5, wherein the electronic device furtherincludes a headset which is used to issue a prompt sound; a start timefor detecting the audio time is after the headset plays the promptsound.
 8. The method of detecting audio input mode as claimed in claim4, wherein the electronic device further includes a speaker which isused to issue a prompt sound; a start time for detecting the audio timeis after the speaker plays the prompt sound.
 9. The method of detectingaudio input mode as claimed in claim 1, wherein the audio threshold timeis 0.2 seconds to 0.9 seconds.
 10. The method of detecting audio inputmode as claimed in claim 1, wherein detecting the audio time is startedwhen the user presses the start button.
 11. The method of detectingaudio input mode as claimed in claim 1, wherein when the audio inputmode is the long-press mode, an end time of user input audio is the timeat which the user releases the start button; when the audio input modeis the short-press mode, an end time of user input audio is not the timeat which the user releases the start button.